package com.czlis.boe;

public class TestPICICode {

	public static void main(String[] args) {
		String lotNo = "上海G5 6.36 0.3T 20粒 A190530-480 不烘烤 RO第二批改善批";
		if (lotNo.startsWith("SN-")) {
			lotNo = lotNo.substring(3);
			int index = lotNo.indexOf("-");
			String preLotno = lotNo.substring(index - 6, index);
			String endLotno = lotNo.substring(index + 1);
			endLotno = endLotno.substring(0, endLotno.indexOf("-"));
			System.out.println(preLotno + "-" + endLotno);
		}
		if (lotNo.startsWith("上海G5")) {
			lotNo = lotNo.substring(lotNo.indexOf("A")+1);
			lotNo = lotNo.substring(0, lotNo.indexOf(" "));
			System.out.println(lotNo);
		}
	}
}
